package com.javasm.springmybatis.service.impl;

import com.javasm.springmybatis.entity.Admin;
import com.javasm.springmybatis.mapper.AdminMapper;
import com.javasm.springmybatis.service.IAdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author whl
 * @since 2021-12-28
 */
@Service
@Transactional  //开启事务第二步
public class AdminServiceImpl implements IAdminService {

    @Autowired
    private AdminMapper adminMapper;


    @Override
    public List<Admin> list() {
        return adminMapper.list();
    }
}
